<?php
	//$Id: load-run.php 383 2009-03-03 06:38:10Z cameron.bracken $
	//this is called when the user requests to load the data from a previous run
	//the R script brews up the form values and creates vars.php
	$filename = $_GET['run_file_to_load'];
	$type = $_GET['type'];
		
	system("Rscript R/load-run.R $filename");
	
	if($type == 'param'){
		header('Location: input-data.php');
	}elseif($type == 'results'){
		header('Location: results.php');
	}
?>